<?php
/**
 * ユニットテストクラス
 */
require_once 'simpletest/unit_tester.php';
require_once 'simpletest/reporter.php';
require_once __DIR__ . '/../TeamSelectMapper.php';

class Components_TeamSelect_Mapper_Test extends UnitTestCase
{
	protected $_object;

	public function setUp(){
		$this->_object = new Components_TeamSelect_Mapper();
	}

	public function TestConstruct1100()
	{
		$aryTeamNameList = $this->_object->getAll();
		print_r($aryTeamNameList);
	}

	public function TestGetTeamName()
	{
		$Dataset = $this->_object->getAll();
		$RESULT = $this->_object->getTeamName(0);
		$this->assertEqual($RESULT, $Dataset[0]['NAME']);
		$RESULT = $this->_object->getTeamName(1);
		$this->assertEqual($RESULT, $Dataset[1]['NAME']);
	}

	public function TestGetTeamId()
	{
		$Dataset = $this->_object->getAll();
		$RESULT = $this->_object->getTeamId(0);
		$this->assertEqual($RESULT, $Dataset[0]['ID']);
	}

	public function TestCreateSelectOptions()
	{
		$RESULT = $this->_object->createSelectOptions();
		print_r($RESULT);
	}
}